﻿using System;
using System.ComponentModel.DataAnnotations;
using YaAppoint.Appointments.Schedules;

namespace YaAppoint.Devices
{
    public class DeviceDto
    {
        public Guid? Id { get; set; }

        public string Name { get; set; }

        public Guid DeviceTypeId { get; set; }

        public string DeviceTypeName { get; set; }

        public Guid DepartmentId { get; set; }

        public Guid? ScheduleId { get; set; }

        public ScheduleDto? Schedule { get; set; }

        public string? ScheduleName {
            get
            {
                return Schedule?.Name ?? string.Empty;
            }
        }

        public string? Code { get; set; }

        public string OuterCode { get; set; }

        public string? Manufacturer { get; set; }

        public string? Model { get; set; }

        public string? AeTitle { get; set; }

        public int Order { get; set; }

        [Required]
        public DeviceStatus Status { get; set; }

        public bool IsActive { get; set; }

        public bool VisibleCompoundName { get; set; } = true;

        public Guid RoomId { get; set; }
    }
}
